package com.timo.shopp.management.controller;



import com.timo.shopp.management.service.UserService;
import com.timo.shopp.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author timo
 * @since 2019-03-26
 */
@RestController
@RequestMapping("//user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/detail")
    public String detail(){
        return "fdsad";
    }

    @GetMapping("/get")
    public User get(Integer id){
        return userService.findUserBy(id);
    }
}
